<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="common/common::common('修改字典类型表')"/>
    <script th:src="@{/static/admin/dict/type/edit.js}" charset="utf-8"></script>
</head>
<body>

<form class="layui-form" id="editDictTypeForm" th:object="${dictType}">
    <div class="layui-form-body">

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="required">*</span>字典名称
            </label>
            <div class="layui-input-block">
                <input type="text" id="dictName" name="dictName" th:field="*{dictName}"
                       autocomplete="off" lay-verify="required" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="required">*</span>字典类型
            </label>
            <div class="layui-input-block">
                <input type="text" id="dictType" name="dictType" th:field="*{dictType}"
                       autocomplete="off" lay-verify="required" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="required">*</span>状态
            </label>
            <div class="layui-input-block" th:with="dicts=${@dict.data('dict_data_status')}">
                <input type="radio" name="status" th:each="dict : ${dicts}"
                       th:id="${'status_' + dict.value}"
                       th:field="*{status}"
                       th:title="${dict.label}"
                       th:value="${dict.value}"
                       th:checked="${dictType.status}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                备注
            </label>
            <div class="layui-input-block">
                        <textarea id="remarks" name="remarks" th:field="*{remarks}" maxlength="200"
                                  autocomplete="off" class="layui-textarea"></textarea>
            </div>
        </div>
    </div>

    <div class="form-footer">
        <button type="button" class="button-sub" lay-submit lay-filter="editDictType">保存</button>
        <button type="button" class="button-close" id="buttonClose">关闭</button>
    </div>
    <input type="text" th:value="*{id}" id="id" name="id" style="display: none">
</form>

</body>
</html>